from gui.utils.colors import TechnologyColor


class TechProduce:
    def __init__(self, storage=0, daily=0, color=None):
        self.color = color
        self.storage = storage
        self.daily = daily

        self.current_tech_name: str | None = None
        self.target_point = 0
        self.current_point = 0

    def research(self, name):
        self.current_tech_name = name
        self.target_point = 0
        self.current_point = 0


class TechPanel:
    def __init__(self):
        self.rate = {
            'physics': 30,
            'engineer': 30,
            'beyond': 40
        }
        self.physics = TechProduce(color=TechnologyColor['physics'])
        self.engineer = TechProduce(color=TechnologyColor['engineer'])
        self.beyond = TechProduce(color=TechnologyColor['beyond'])

        self.physics.research('军事科技')
        self.engineer.research('民用科技')
        self.beyond.research('超越科技')

        self.physics.target_point = 100
        self.physics.current_point = 50

        self.engineer.target_point = 300
        self.engineer.current_point = 120

        self.beyond.target_point = 5000
        self.beyond.current_point = 1238
